package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;

@TableName("t_buyOrder")
public class BuyOrderBean {
    /**采购订单id*/
    @TableId(value = "pk_buyOrderId", type = IdType.AUTO)
    private Integer buyOrderId;
    /**供应商名字*/
    @TableField("bo_supplierName")
    private String supplierName;
    /**采购员*/
    @TableField("bo_buyer")
    private String buyer;
    /**采购时间*/
    @TableField("bo_date")
    private LocalDate date;
    /**采购订单详情集合*/
    @TableField(exist = false)
    private List<BuyInfoBean> buyInfoBeanList;

    public BuyOrderBean() {
    }

    public BuyOrderBean(String supplierName, String buyer, LocalDate date) {
        this.supplierName = supplierName;
        this.buyer = buyer;
        this.date = date;
    }

    public BuyOrderBean(Integer buyOrderId, String supplierName, String buyer, LocalDate date) {
        this.buyOrderId = buyOrderId;
        this.supplierName = supplierName;
        this.buyer = buyer;
        this.date = date;
    }

    public Integer getBuyOrderId() {
        return buyOrderId;
    }

    public void setBuyOrderId(Integer buyOrderId) {
        this.buyOrderId = buyOrderId;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getBuyer() {
        return buyer;
    }

    public void setBuyer(String buyer) {
        this.buyer = buyer;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public List<BuyInfoBean> getBuyInfoBeanList() {
        return buyInfoBeanList;
    }

    public void setBuyInfoBeanList(List<BuyInfoBean> buyInfoBeanList) {
        this.buyInfoBeanList = buyInfoBeanList;
    }

    @Override
    public String toString() {
        return "BuyOrderBean{" +
                "buyOrderId=" + buyOrderId +
                ", supplierName='" + supplierName + '\'' +
                ", buyer='" + buyer + '\'' +
                ", date=" + date +
                ", buyInfoBeanList=" + buyInfoBeanList +
                '}'+"\n";
    }
}
